From 6ca912d6948953ad49f9bce0952f28d8106a50fa Mon Sep 17 00:00:00 2001 From: Chris Wong Date: Mon, 27 Apr 2015 19:09:48 +1200 Subject: [PATCH] Set $USER variable in integration tests This variable isn't set on homu, so we need to add it ourselves. --- tests/test_cargo_new.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_cargo_new.rs b/tests/test_cargo_new.rs index 61c4c6b7c..6a7b82c77 100644 --- a/tests/test_cargo_new.rs +++ b/tests/test_cargo_new.rs @@ -97,7 +97,7 @@ test!(invalid_characters { }); test!(rust_prefix_stripped { - assert_that(cargo_process("new").arg("rust-foo"), + assert_that(cargo_process("new").arg("rust-foo").env("USER", "foo"), execs().with_status(0) .with_stdout("note: package will be named `foo`; use --name to override")); let toml = paths::root().join("rust-foo/Cargo.toml"); @@ -107,7 +107,7 @@ test!(rust_prefix_stripped { }); test!(bin_disables_stripping { - assert_that(cargo_process("new").arg("rust-foo").arg("--bin"), + assert_that(cargo_process("new").arg("rust-foo").arg("--bin").env("USER", "foo"), execs().with_status(0)); let toml = paths::root().join("rust-foo/Cargo.toml"); let mut contents = String::new(); @@ -116,7 +116,7 @@ test!(bin_disables_stripping { }); test!(explicit_name_not_stripped { - assert_that(cargo_process("new").arg("foo").arg("--name").arg("rust-bar"), + assert_that(cargo_process("new").arg("foo").arg("--name").arg("rust-bar").env("USER", "foo"), execs().with_status(0)); let toml = paths::root().join("foo/Cargo.toml"); let mut contents = String::new(); -- 2.30.2